<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.course.entity.GuanliyuanAdmin" %>
<!DOCTYPE html>
<html>
<head>
    <title>管理员首页</title>
    <style>
        body { background: #23272e; font-family: 'Microsoft YaHei', Arial, sans-serif; }
        .sidebar {
            position: fixed;
            top: 0; left: 0; bottom: 0;
            width: 200px;
            background: #181a20;
            padding-top: 60px;
            box-shadow: 2px 0 8px rgba(0,0,0,0.15);
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .sidebar ul {
            list-style: none; padding: 0; margin: 0; width: 100%;
        }
        .sidebar li {
            width: 100%;
        }
        .sidebar a {
            display: block;
            color: #e0e0e0;
            text-decoration: none;
            font-size: 18px;
            padding: 18px 0 18px 40px;
            transition: background 0.2s, color 0.2s;
        }
        .sidebar a:hover, .sidebar a.active {
            background: #2d313a;
            color: #4fc3f7;
        }
        .sidebar .logout {
            color: #ff8a65;
            margin-top: 40px;
            padding-left: 40px;
        }
        .container {
            width: 500px;
            margin: 60px auto 0 240px;
            background: #23272e;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            padding: 40px;
            text-align: center;
        }
        h2 { margin-bottom: 20px; color: #fff; }
        .info { color: #b0b8c1; margin-top: 20px; text-align: left; }
    </style>
</head>
<body>
<div class="sidebar">
    <ul>
        <li><a href="guanliyuan_index.jsp">首页</a></li>
        <li><a href="guanliyuan_student_manage">学生账号管理</a></li>
        <li><a href="guanliyuan_teacher_manage">老师账号管理</a></li>
        <li><a href="guanliyuan_course_manage">管理课程</a></li>
    </ul>
    <a href="logout" class="logout">退出登录</a>
</div>
<div class="container">
    <h2>管理员专属首页</h2>
    <div class="info">
        <% 
            GuanliyuanAdmin admin = (GuanliyuanAdmin) session.getAttribute("guanliyuan_admin");
            if (admin != null) {
        %>
            <p>欢迎您，<b><%= admin.getName() %></b>（用户名：<%= admin.getUsername() %>）</p>
            <p>邮箱：<%= admin.getEmail() == null ? "-" : admin.getEmail() %></p>
            <p>电话：<%= admin.getPhone() == null ? "-" : admin.getPhone() %></p>
        <% } else { %>
            <p>您还未登录，请先<a href="guanliyuan_login.jsp">登录</a></p>
        <% } %>
    </div>
</div>
</body>
</html> 